package mo.daliy;

public class L1822 {

    public int arraySign(int[] nums) {
        int negativeCount = 0;
        for (int num : nums) {
            if (num == 0) {
                return 0;
            } else if (num < 0) {
                negativeCount++;
            }
        }
        if (negativeCount % 2 == 0) {
            return 1;
        }
        return -1;
    }

}
